'''
Created on Jul 4, 2012

@author: Carrie
'''

import ConfigParser

config = ConfigParser.ConfigParser()
config.read('config.txt')

REVISION = config.get('Version', 'revision')

# URL's
LIST = config.get('URL', 'country list')
CLCONF = config.get('URL', 'hma config')
check_ip_url = config.get('URL', 'ip check')

xml_log = config.get('Script Settings', 'event log')
txt_status = config.get('Script Settings', 'status log')
hmaauth = config.get('HMA Settings', 'Validation File')

# Server reset interval
NEW_SERVER = config.get('Script Settings', 'Server Switch')

# Start vpn command sequence
openvpn_cmd = ['openvpn', '--config', 'client.cfg', '--auth-user-pass', hmaauth]

def set_version(new_version):
    config.set('Version', 'revision', new_version)